package com.yang.consumer.controller;

import com.yang.consumer.feignclient.ProductClient;
import com.yang.common.dto.ResultVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author ：YangRan
 * @date ：Created in 2021/11/21 15:56
 * @description：openfeign测试类
 * @modified By：
 * @version: 1.0
 */
@RestController
public class FeignTestController {


    @Autowired
    private ProductClient productClient;

    @GetMapping("/queryProduct/{id}")
    ResultVO queryProductById(@PathVariable("id")Long id) {
        return productClient.queryProductById(id);
    }
}
